home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / DomonicDefence4.swf / scripts / DefineButton2_1432 / BUTTONCONDACTION on(press).as
Encoding:
Text File  |  2005-09-27  |  1.0 KB  |  38 lines

  1. on(press){
  2.    if(this.typeRune == "Magic Rune" && _root.money >= runePrice)
  3.    {
  4.       _root.magRune += useThis;
  5.       _root.money -= runePrice;
  6.       _parent.messo = "Got Magic Runes!";
  7.    }
  8.    else if(this.typeRune == "Fire Rune" && _root.money >= runePrice)
  9.    {
  10.       _root.fireRune += useThis;
  11.       _root.money -= runePrice;
  12.       _parent.messo = "Got Fire Runes!";
  13.    }
  14.    else if(this.typeRune == "Wind Rune" && _root.money >= runePrice)
  15.    {
  16.       _root.windRune += useThis;
  17.       _root.money -= runePrice;
  18.       _parent.messo = "Got Wind Runes!";
  19.    }
  20.    else if(this.typeRune == "Time Rune" && _root.money >= runePrice)
  21.    {
  22.       _root.timeRune += useThis;
  23.       _root.money -= runePrice;
  24.       _parent.messo = "Got Time Runes!";
  25.    }
  26.    else if(this.typeRune == "Explosion Rune" && _root.money >= runePrice)
  27.    {
  28.       _root.exploRune += useThis;
  29.       _root.money -= runePrice;
  30.       _parent.messo = "Got Explosion Runes!";
  31.    }
  32.    else
  33.    {
  34.       _parent.messo = "Not Enough Money!";
  35.    }
  36.    this._visible = false;
  37. }
  38.